<?php
class Article_description_to {

	private $number;
	private $content;
	private $article_number;
	private $autor_login;	
	private $date;	
	private $state;

	
	public function __construct($number, $content, $article_number, 
									$autor_login, $date, $state){
									 
		$this->number = $number; 
		$this->content = $content;
		$this->article_number = $article_number;
		$this->autor_login = $autor_login;
		$this->date = $date;
		$this->state = $state;			
	}

	public function get_number() {
		return $this->number; 
	}
	
	public function get_content() {
		return $this->content; 
	}
	
	public function get_article_number() {
		return $this->article_number; 
	}

	public function get_autor_login() {
		return $this->autor_login; 
	}
		
	public function get_date() {
		return $this->date;
	}
	
	public function get_state() {
		return $this->state;
	}
	
	public function set_content($content) {
		$this->content = $content;
	}
	
	public function set_state($state) {
		$this->state = $state;
	}
	
	public function equals($object) {
		if ((get_class($this) != get_class($object)) ||
				($object == null))				
			 return false;
		else {
			if (($this->number == $object->get_number()) &&
				($this->content == $object->get_content()) &&
				($this->article_number == $object->get_article_number()) &&
				($this->autor_login == $object->get_autor_login()) &&
				($this->date == $object->get_date()) &&
				($this->state == $object->get_state()))
				return true;
			return false;
		}
	}
	
	public function to_string() {
		return 'number: ' . $this->number . ' | ' .
				'content: ' . $this->content . ' | ' .
				'article number: ' . $this->article_number . ' | ' .
				'autor login: ' . $this->autor_login . ' | ' .
				'date: ' . $this->date . ' | ' .
				'state: ' . $this->state;
	}
}

?>